<template>
  <div id="app">
  <router-view></router-view>
  </div>
</template>
<script>
export default {
  name:'App',
  components:{},
  data(){
    return{
      user:JSON.parse(sessionStorage.getItem('CurUser')),
      // menuList:JSON.parse(sessionStorage.getItem('menuList'))
    }
  },
  watch:{
    '$store.state.menu':{
      handler(val,old){
        if(!old && this.user && this.user.username){
          this.$store.commit("setRouter",val)
        }
      },
      immediate:true
    }
  },
  mounted() {
    // this.$store.commit("setMenu",this.menuList)
  }
}
</script>
<style>
#app{
  height: 100%;
}
</style>

